<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="h-ui-font/iconfont.min.css" />
		<link rel="stylesheet" type="text/css" href="css/jquery-weui.min.css" />
		<link rel="stylesheet" type="text/css" href="css/weui.min.css" />
		<script src="js/jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/jquery-weui.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="js/vue(1).js" type="text/javascript" charset="utf-8"></script>
		<style type="text/css">
			body {
				width: 100%;
				margin: 0px auto;
				min-width: 320px;
				max-width: 640px;
			}
			
			.top {
				width: 100%;
				height: 50px;
				min-width: 320px;
				max-width: 640px;
				line-height: 50px;
				color: white;
				font-size: 18px;
				text-indent: 10px;
				position: fixed;
				background-color: #0F88EB;
			}
			
			.top a {
				color: white;
				margin-right: 10px;
			}
			
			.contents {
				width: 100%;
				padding-top: 50px;
				padding-bottom: 40px;
				overflow: auto;
				/*border: 1px solid red;*/
			}
			
			.weui-tabbar {
				min-width: 320px;
				max-width: 640px;
				height: 40px;
				position: fixed;
			}
			
			.weui-tabbar__icon {
				margin-top: -4px;
			}
			
			.active {
				color: rgba(0, 0, 255, 0.8) !important;
			}
			
			.item {
				box-sizing: border-box;
				width: 100%;
				display: inline-block;
				color: black;
				padding: 10px;
				border-top: 5px solid #c8c8c8;
			}
			
			.itemtop {
				width: 100%;
				height: 20px;
				overflow: hidden;
			}
			
			.itemtop span {
				height: 100%;
				font-size: 12px;
				float: left;
				color: #c6c6c6;
				line-height: 20px;
				display: inline-block;
			}
			
			.itemtop span:first-child {
				width: 20px;
				margin-right: 5px;
				border-radius: 10px;
				overflow: hidden;
			}
			
			.itemtop span:nth-of-type(1) img {
				width: 100%;
			}
			
			.itemtitle {
				font-size: 14px;
			}
			
			.itemtitle p {
				float: right;
				font-size: 12px;
				color: #c0c0c0;
			}
			
			.itemcontent {
				height: 60px;
				margin-top: 5px;
				font-size: 12px;
				display: -webkit-box;
				overflow: hidden;
				text-overflow: ellipsis;
				word-wrap: break-word;
				white-space: normal !important;
				-webkit-line-clamp: 3;
				-webkit-box-orient: vertical;
			}
			
			.itemtext {
				height: 20px;
				font-size: 12px;
				color: #c6c6c6;
				margin-top: 5px;
			}
			
			.itemtext span {
				margin-left: 5px;
			}
			
			.itemtext span:first-child {
				margin-left: 0px;
			}
		</style>
	</head>

	<body>
		<div class="top">
			<a href="more.html" class="Hui-iconfont Hui-iconfont-slider-left"></a>我的收藏</div>
		<div class="contents">
			<a href="javascript:;" v-on:click="content($index)" class="item" v-for="item in json1[2]">
				<div class="itemtitle" v-html="item.title"></div>
				<div class="itemcontent" v-html="item.context"></div>
				<div class="itemtext"><span v-html="item.n_zan"></span>赞同<span v-html="item.n_ping"></span>评论<span>已收藏问题</span></div>
			</a>

		</div>
		<div class="weui-tabbar">
			<a href="index.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<i class="Hui-iconfont Hui-iconfont-canshu"></i>
				</div>
			</a>
			<a href="find.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<i class="Hui-iconfont Hui-iconfont-yanjing"></i>
				</div>
			</a>
			<a href="chart.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<i class="Hui-iconfont Hui-iconfont-xiaoxi1"></i>
				</div>
			</a>
			<a href="more.html" class="weui-tabbar__item">
				<div class="weui-tabbar__icon">
					<i class="Hui-iconfont Hui-iconfont-menu active"></i>
				</div>
			</a>
		</div>
		<script type="text/javascript">
			var ss = sessionStorage.getItem("token");
			var dd = sessionStorage.getItem("appid");
			var year = new Date();
			var nian = year.getFullYear();
			var yue = (year.getMonth() + 1) < 10 ? "0" + (year.getMonth() + 1) : year.getMonth() + 1;
			var day = year.getDate() < 10 ? "0" + year.getDate() : year.getDate();
			var str1 = nian + "-" + yue + "-" + day;
			var vue = new Vue({
				el: "body",
				data: {
					json1: [],

				},
				methods: {
					start: function() {
						$.ajax({
							type: "get",
							url: "http://v2.mashupcloud.cn/SQL/get_collec/",
							data: {
								appid: dd,
								token: ss,
								name: 'get_collec',
								_v1: sessionStorage.getItem("username")

							},
							success: function(json) {
								vue.json1 = JSON.parse(json);
								console.log(vue.json1)
								console.log(vue.json1[2][0])
							}
						});
					},
					content:function(index){
						location.href = "content.html?" + "index=" + encodeURI(vue.json1[2][index].id);
					}
				}
			});
			vue.start();
		</script>
	</body>

</html>